package com.avalon.core.service;

import com.avalon.core.condition.Condition;
import com.avalon.core.exception.AvalonException;
import com.avalon.core.field.Field;
import com.avalon.core.model.PageInfo;
import com.avalon.core.model.PageParam;
import com.avalon.core.model.Record;

/**
 * 服务可以支持树结构的接口
 * 固定 字段 parentId 上级id，parentPath 上级路径 1,2;
 */
public interface ITreeSupport {

    Field getParentIdField();

    Field getParentPathField();

    PageInfo selectTreePage(PageParam pageParam, String fields,
                            String order, Condition condition) throws AvalonException;

    PageInfo selectTreePage(PageParam pageParam, String fields,
                            Condition condition) throws AvalonException;
}
